package net.zhangdaqian.lightDom;

public class CompareDom {
	public LightDocument compareDom(LightDocument doc1, LightDocument doc2) {
		LightDocument doc = new LightDocument();
		Integer max1 = doc1.getMaxLevel();
		Integer max2 = doc2.getMaxLevel();
		for (int level = 1; level < (max1 < max2 ? max1 : max2); level++) {
			if (doc1.getElementsByLevel(level).length() == doc2
					.getElementsByLevel(level).length()) {
				System.out.println("equal at level" + level);
				doc.getElementsCollect().add(doc1.getElementsByLevel(level));
			} else {
				
			}
		}
		System.out.println(doc.body().innerHtml());
		return null;
	}
}
